<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Kblog</title>

    <!-- Bootstrap -->
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/highlight.js/8.5/styles/default.min.css">
    <link rel="stylesheet" href="/style.css">
    
      

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
<nav class="navbar navbar-default">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/">KayChen</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="/">首页 <span class="sr-only">(current)</span></a></li>
        <li><a href="http://old.kaychen.cn" target="_blank">旧博客</a></li>
      </ul>
      <form class="navbar-form navbar-right" role="search">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Search">
        </div>
        <button type="submit" class="btn btn-default">搜索</button>
      </form>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

<div class="container">
  <div class="row">
    <div class="col-xs-12 col-md-8">@yield('content')</div>
    <div class="col-xs-12 col-md-4">
      <div class="sidebar">
        <div class="widget">
          <h4 class="title">分类目录</h4>
          <div class="content">
            @foreach ($categorys as $category)
              <li><a href="{{ url('category',$category->id) }}">{{ $category->category_name }}</a></li>
            @endforeach
          </div>
        </div>
        <div class="widget">
          <h4 class="title">友情链接</h4>
          <div class="content">
	    <li><a href="http://www.huffingtonpost.com/lindsay-ferrier/this-is-what-happens-when-you-order-ridiculously-cheap-clothing-from-singapore_b_6249572.html" target="_blank">clothing</a></li>
          </div>
        </div>
        <div class="widget">
          <h4 class="title">管理</h4>
          <div class="content">
            @if ($admin)
            <li><a href="{{ url('/archive/create') }}">创建新文章</a></li>
            <li><a href="{{ url('/category/create') }}">创建新分类</a></li>
            <li><a href="{{ url('/category') }}">管理分类</a></li>
            <li><a href="{{ url('/logout') }}">退出</a></li>
            @else
            <li><a href="{{ url('/login') }}">登录</a></li>
            @endif
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<footer class="footer">
  <div class="container">
  © 2016 KayChen. Copyright. <a href="http://www.kaychen.cn" target="_blank">Kblog</a>
  </div>
</footer>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    <script src="//cdn.bootcss.com/highlight.js/8.5/highlight.min.js"></script>
    <script>hljs.initHighlightingOnLoad();</script>
    <script src="/js/upload.js"></script>
  </body>
</html>
